LEADTOOLS Medical (Leadtools.Medical.Caching assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.25
Add(String,Byte[],CacheItemPriority) Method
See Also 
Leadtools.Medical.Caching Namespace > Cache Class > Add Method : Add(String,Byte[],CacheItemPriority) Method



id
A System.String that uniquely identifies the cache item to be added.
data
An array of System.Byte representing the item data.
priority
The relative precedence of the cache item expressed by System.Web.Caching.CacheItemPriority. Items with lower cache priority will be removed before items with higher priority.

The Add(String,Byte[],CacheItemPriority) Method is available as an add-on to the LEADTOOLS Medical Imaging toolkits.

id
A System.String that uniquely identifies the cache item to be added.
data
An array of System.Byte representing the item data.
priority
The relative precedence of the cache item expressed by System.Web.Caching.CacheItemPriority. Items with lower cache priority will be removed before items with higher priority.
Adds a new item to the cache store.

Syntax

Visual Basic (Declaration) 
Overloads Public Overridable Sub Add( _
   ByVal id As String, _
   ByVal data() As Byte, _
   ByVal priority As CacheItemPriority _
) 
Visual Basic (Usage)Copy Code
Dim instance As Cache
Dim id As String
Dim data() As Byte
Dim priority As CacheItemPriority
 
instance.Add(id, data, priority)
C# 
public virtual void Add( 
   string id,
   byte[] data,
   CacheItemPriority priority
)
C++/CLI 
public:
virtual void Add( 
   String^ id,
   array<byte>^ data,
   CacheItemPriority priority
) 

Parameters

id
A System.String that uniquely identifies the cache item to be added.
data
An array of System.Byte representing the item data.
priority
The relative precedence of the cache item expressed by System.Web.Caching.CacheItemPriority. Items with lower cache priority will be removed before items with higher priority.

Remarks

This method will check whether the item already exists before inserting it. If the item exists this method will throw exception. To force the Cache object to try inserting the cache item call the Insert(String,Byte[],CacheItemPriority) method.

Requirements

Target Platforms: Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also